/**
 * @fileoverview Blocks for the Blockly modification.
 *
 * @license Copyright 2015 The Coding with Chrome Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @author mbordihn@google.com (Markus Bordihn)
 */
{namespace cwc.soy.simple.Blocks autoescape="strict"}



/**
 * Blockly blocks.
 */
{template .toolbox}
  <xml>
    <category name="Command" colour="290">
      <block type="simple_text_write">
        <value name="text">
          <block type="text"><field name="TEXT"></field></block>
        </value>
      </block>
      <block type="simple_text_write_line">
        <value name="text">
          <block type="text"><field name="TEXT"></field></block>
        </value>
      </block>
    </category>

    <category name="Draw" colour="260">
      <block type="simple_draw_clear"></block>
      <block type="simple_draw_circle">
        <value name="x">
          <shadow type="math_number"><field name="NUM">150</field></shadow>
        </value>
        <value name="y">
          <shadow type="math_number"><field name="NUM">150</field></shadow>
        </value>
        <value name="radius">
          <shadow type="math_number"><field name="NUM">100</field></shadow>
        </value>
        <value name="fillColor">
          <shadow type="colour_picker"><field name="COLOUR">#ff0000</field></shadow>
        </value>
        <value name="borderColor">
          <shadow type="colour_picker"><field name="COLOUR">#000000</field></shadow>
        </value>
        <value name="borderSize">
          <shadow type="math_number"><field name="NUM">1</field></shadow>
        </value>
      </block>
      <block type="simple_draw_rectangle">
        <value name="x">
          <shadow type="math_number"><field name="NUM">250</field></shadow>
        </value>
        <value name="y">
          <shadow type="math_number"><field name="NUM">200</field></shadow>
        </value>
        <value name="width">
          <shadow type="math_number"><field name="NUM">350</field></shadow>
        </value>
        <value name="height">
          <shadow type="math_number"><field name="NUM">350</field></shadow>
        </value>
        <value name="fillColor">
          <shadow type="colour_picker"><field name="COLOUR">#00ff00</field></shadow>
        </value>
        <value name="borderColor">
          <shadow type="colour_picker"><field name="COLOUR">#000000</field></shadow>
        </value>
        <value name="borderSize">
          <shadow type="math_number"><field name="NUM">1</field></shadow>
        </value>
      </block>
      <block type="simple_draw_line">
        <value name="start_x">
          <shadow type="math_number"><field name="NUM">50</field></shadow>
        </value>
        <value name="start_y">
          <shadow type="math_number"><field name="NUM">50</field></shadow>
        </value>
        <value name="end_x">
          <shadow type="math_number"><field name="NUM">300</field></shadow>
        </value>
        <value name="end_y">
          <shadow type="math_number"><field name="NUM">250</field></shadow>
        </value>
        <value name="fillColor">
          <shadow type="colour_picker"><field name="COLOUR">#0000ff</field></shadow>
        </value>
        <value name="borderSize">
          <shadow type="math_number"><field name="NUM">5</field></shadow>
        </value>
      </block>
      <block type="simple_draw_point">
        <value name="x">
          <shadow type="math_number"><field name="NUM">25</field></shadow>
        </value>
        <value name="y">
          <shadow type="math_number"><field name="NUM">25</field></shadow>
        </value>
        <value name="fillColor">
          <shadow type="colour_picker"><field name="COLOUR">#ff00ff</field></shadow>
        </value>
        <value name="borderSize">
          <shadow type="math_number"><field name="NUM">10</field></shadow>
        </value>
      </block>
      <block type="simple_draw_ellipse">
        <value name="x">
          <shadow type="math_number"><field name="NUM">150</field></shadow>
        </value>
        <value name="y">
          <shadow type="math_number"><field name="NUM">150</field></shadow>
        </value>
        <value name="width">
          <shadow type="math_number"><field name="NUM">200</field></shadow>
        </value>
        <value name="height">
          <shadow type="math_number"><field name="NUM">100</field></shadow>
        </value>
        <value name="fillColor">
          <shadow type="colour_picker"><field name="COLOUR">#ff0000</field></shadow>
        </value>
        <value name="borderColor">
          <shadow type="colour_picker"><field name="COLOUR">#000000</field></shadow>
        </value>
        <value name="borderSize">
          <shadow type="math_number"><field name="NUM">1</field></shadow>
        </value>
      </block>
      <block type="simple_draw_triangle">
        <value name="x1">
          <shadow type="math_number"><field name="NUM">50</field></shadow>
        </value>
        <value name="y1">
          <shadow type="math_number"><field name="NUM">50</field></shadow>
        </value>
        <value name="x2">
          <shadow type="math_number"><field name="NUM">150</field></shadow>
        </value>
        <value name="y2">
          <shadow type="math_number"><field name="NUM">150</field></shadow>
        </value>
        <value name="x3">
          <shadow type="math_number"><field name="NUM">300</field></shadow>
        </value>
        <value name="y3">
          <shadow type="math_number"><field name="NUM">100</field></shadow>
        </value>
        <value name="fillColor">
          <shadow type="colour_picker"><field name="COLOUR">#ffff00</field></shadow>
        </value>
        <value name="borderColor">
          <shadow type="colour_picker"><field name="COLOUR">#ff0000</field></shadow>
        </value>
        <value name="borderSize">
          <shadow type="math_number"><field name="NUM">1</field></shadow>
        </value>
      </block>
      <block type="simple_draw_text">
        <value name="text">
          <block type="text"><field name="TEXT"></field></block>
        </value>
        <value name="x">
          <shadow type="math_number"><field name="NUM">10</field></shadow>
        </value>
        <value name="y">
          <shadow type="math_number"><field name="NUM">30</field></shadow>
        </value>
        <value name="fillColor">
          <shadow type="colour_picker"><field name="COLOUR">#aaaaaa</field></shadow>
        </value>
      </block>
    </category>

    <sep></sep>

    {call cwc.soy.Blocks.defaultBlocks /}

    <sep></sep>

    {call cwc.soy.Blocks.defaultAdvancedBlocks /}
  </xml>
{/template}
